
import { LGXMatrix } from "../../struct/math/matrix";
var LGXMathTool = {}

LGXMathTool.scale = function (pt, basePt, sx, sy) {
    let detax = pt.x - basePt.x;
    let detay = pt.y - basePt.y;
    pt.x = basePt.x + sx * detax;
    pt.y = basePt.y + sy * detay;
}


LGXMathTool.calLocalMatrix = function (orin, degree) {
    let mtx = new LGXMatrix();
    mtx.SetR({ x: 0, y: 0, z: degree });
    mtx.SetT({ x: orin.x, y: orin.y, z: 0 });
    return mtx;
}

export { LGXMathTool }